#include <memory>
#include "TcpServer.hpp"

void Usage(string s)
{
    s += " port";
    cout<< s <<endl;
}

// ./tcpserver port
int main(int argc,char* argv[])
{
    if(argc != 2)
    {
        Usage(argv[0]);
    }

    uint16_t serverPort = stoi(argv[1]);

    unique_ptr<TcpServer> svr(new TcpServer(serverPort));

    svr->Init();
    svr->Run();

    return 0;
}